define(["utils"],function(utils){
    return {
        init:function(PM){
            PM.start({
                // host:"http://10.21.2.115:3333",
                host:"http://115.29.39.62:7001/question",
                customerComponents:{
                  QueListDescCtl:"./components/QueListDescCtl",
                  ContentLabelCtl:"./components/ContentLabelCtl"
                },
                root:"index",
                baseSize:{width:375,height:667},
                beforeSendAjax:function(){

                },
                onAjaxResponse:function(params){
                  if(params.isSuccess){
                    if(params.data){
                      var code = params.data.code;
                      if(code.toString()==="100010008"){
                        PM.showTip({
                          text:"操作过期,两秒后会自动退出",
                          duration:3500,
                          clickNoHide:true
                        });
                        try{
                          window.setTimeout(function(){
                            window.yyesn.client.closePage();
                          },3500);
                        }catch(e){}
                      }
                    }

                  }
                },
                routerChange:function(arg){
                  if(!arg.isForward&&arg.fromPage=="index"){
                    window.yyesn.client.closePage();
                  }
                }
            });

        }
    };
});
